package com.ym.medical.enums;

import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.databind.util.StdConverter;
import com.ym.common.annotations.EnumDescription;
import com.ym.common.constant.DictEnum;

/**
 * 认证表-审核状态
 */
@EnumDescription("认证表-审核状态")
public enum RelevantCertRecordAuditStatus implements DictEnum {

	//--------------------start-----------------

	/**
	 * 待审核
	 */
	TO_AUDIT("01","待审核"),
	/**
	 * 审核中
	 */
	IN_THE_REVIEW("02","审核中"),
	/**
	 * 审核通过
	 */
	APPROVED("03","审核通过"),
	/**
	 * 审核不通过
	 */
	AUDIT_NOT_THROUGH("04","审核不通过"),

	//--------------------end-------------------
	;

	private String key;

	private String value;

	RelevantCertRecordAuditStatus(String key, String value) {
		this.key = key;
		this.value = value;
	}

	@Override
	public String getKey() {
		return this.key;
	}

	@Override
	public String getValue() {
		return this.value;
	}

	/**
	 * 序列化使用
	 */
	public static class Covert extends StdConverter<String, JSONObject> {
		@Override
		public JSONObject convert(String value) {
			return DictEnum.valueOfJson(RelevantCertRecordAuditStatus.class,value);
		}
	}
}
